#include "listwindownload.h"
#include "ui_listwindownload.h"
#include "form.h"

listwindownload::listwindownload(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::listwindownload)
{
    ui->setupUi(this);
}

listwindownload::~listwindownload()
{
    delete ui;
}

void listwindownload::on_pushButton_clicked()
{
    //创建列表项元素
    QListWidgetItem *item = new QListWidgetItem();
    ui->listWidget->addItem(item);

    //自定义列表项元素
    Form *w = new Form();

    //设置item尺寸
    item->setSizeHint(w->sizeHint());

    //把w放在列表的item上
    ui->listWidget->setItemWidget(item,w);
}
